           package com.java.diagnostics.visualizer.impl.preferences;
           
           import org.eclipse.core.runtime.Platform;
           import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
           import org.eclipse.core.runtime.preferences.IEclipsePreferences;
           import org.eclipse.core.runtime.preferences.IPreferencesService;
           import org.eclipse.core.runtime.preferences.IScopeContext;
           import org.eclipse.core.runtime.preferences.InstanceScope;
           import org.osgi.service.prefs.Preferences;
           
           public abstract class GCAndMemoryVisualizerPreferenceInitializer extends AbstractPreferenceInitializer
           {
             public SmartPreferences getPreferences()
             {
               return new SmartPreferences(getNodeName());
             }
           
             public SmartPreferences getPreferences(IScopeContext scope) {
               return new SmartPreferences(getNodeName(), scope, new InstanceScope());
             }
           
             public SmartPreferences getPreferences(IScopeContext readScope, IScopeContext writeScope) {
               return new SmartPreferences(getNodeName(), readScope, writeScope);
             }
           
             protected Preferences getDefaultPreferences() {
               IEclipsePreferences root = Platform.getPreferencesService()
                 .getRootNode();
               Preferences prefs = root.node("default").node(getNodeName());
               return prefs;
             }
           
             protected abstract String getNodeName();
           }

